﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLLopHoc.DoiTuongDuLieu;
using QLLopHoc.KetNoiDatabase;

namespace QLLopHoc.XuLyDuLieu
{
    public class XLSinhVien
    {
        //phuong thuc lay danh sach sinh vien khong thuoc lop hoc
        public static List<DTSinhVien> LayDSSVKhongThuocLH(string tenLH) 
        { 
            List<DTSinhVien> ds = KNSinhVien.LayDSSV();
            //List<DTSinhVien> dssv = new List<DTSinhVien>();
            List<string> dsmssv = KNChiTietLH.LayDSMaSVCuaLH(tenLH);
            //List<string> dsmssv = KNChiTietLH.LayDSMaSVCuaLH(tenLH);
            for (int i = 0; i < ds.Count; ++i) 
            { 
                if (dsmssv.Contains(ds[i].MSSV)) 
                { 
                    ds.RemoveAt(i); 
                    --i; 
                } 
            } 
            return ds; 
        }

        
    }
}
